Let's make the game end when the bike collides with one of the blocks!

  • Go to and drag Collision to the bottom of your program.
  • Delete the .hide() command that is inside the collision() event.
  • Go to and drag Text inside of the collision event. It should have a green block in front of it.
  • Change the name (before the = ) to result. Change the words in .Text() parameter to "GAME OVER!".

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)